declare
begin
delete from association where ass_source_elm_id in (
select cmp_target_elm_id from composition
connect by prior cmp_target_elm_id =cmp_source_elm_id 
start with cmp_source_elm_id = :root_elm_id
);

delete from association where ass_target_elm_id in (
select cmp_target_elm_id from composition
connect by prior cmp_target_elm_id =cmp_source_elm_id 
start with cmp_source_elm_id = :root_elm_id
);

delete from element where elm_id in (
select cmp_target_elm_id from composition
connect by prior cmp_target_elm_id =cmp_source_elm_id 
start with cmp_source_elm_id = :root_elm_id
);
end;